<form id="edit-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('用户平台')}:</label>
        <div class="col-xs-12 col-sm-8">
            {if $platform!=2  && $admin_info.id==6}
            <label for="row[platform]-1"><input id="row[platform]-1" {if $row.platform != 2} checked="checked" {/if} name="row[platform]" type="radio" value="1" > 总管理后台</label>

            <label for="row[platform]-2"><input id="row[platform]-2" {if $row.platform == 2} checked="checked"  {/if} name="row[platform]"  type="radio" value="2"> 商户后台</label>
            {elseif $platform!=2 && $admin_info.id!=6/}
            <label for="row[platform]-1"><input id="row[platform]-1" {if $row.platform != 2} checked="checked" {/if} name="row[platform]" type="radio" value="1" > 总管理后台</label>
            {else /}
            <label for="row[platform]-2"><input id="row[platform]-2" name="row[platform]" type="radio" value="2" checked="checked" > 商户后台</label>
            {/if}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Group')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('group[]', $groupdata, $groupids, ['class'=>'form-control', 'data-rule'=>'required'])}
        </div>
    </div>
    <div class="form-group">
        <label for="username" class="control-label col-xs-12 col-sm-2">{:__('Username')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="username" name="row[username]" value="{$row.username}" data-rule="required;username" />
        </div>
    </div>
<!--     <div class="form-group">
        <label for="email" class="control-label col-xs-12 col-sm-2">{:__('Email')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="email" class="form-control" id="email" name="row[email]" value="{$row.email}" data-rule="required;email" />
        </div>
    </div> -->
    <div class="form-group">
        <label for="nickname" class="control-label col-xs-12 col-sm-2">{:__('Nickname')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="nickname" name="row[nickname]" autocomplete="off" value="{$row.nickname}" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="password" class="control-label col-xs-12 col-sm-2">{:__('Password')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="password" class="form-control" id="password" name="row[password]" autocomplete="new-password" value="" data-rule="password" />
        </div>
    </div>
    <div class="form-group">
        <label for="loginfailure" class="control-label col-xs-12 col-sm-2">{:__('Loginfailure')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="number" class="form-control" id="loginfailure" name="row[loginfailure]" value="{$row.loginfailure}" data-rule="required" />
        </div>
    </div>

<!--     <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('用户角色')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[role]', ['1'=>__('管理员'), '2'=>__('普通商户')], $row['role'])}
        </div>
    </div> -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')], $row['status'])}
        </div>
    </div>
    <div id="bank" {if $row.platform == 2} style="display: block;" {else}style='display: none'{/if}>
        <div class="form-group">
            <label for="bank_username" class="control-label col-xs-12 col-sm-2">{:__('Bank_username')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input type="text" class="form-control" id="bank_username" name="row[bank_username]" autocomplete="off" value="{$row.bank_username}" placeholder="请填写银行开户人姓名" />
            </div>
        </div>
        <div class="form-group">
            <label for="bank_name" class="control-label col-xs-12 col-sm-2">{:__('Bank_name')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input type="text" class="form-control" id="bank_name" name="row[bank_name]" autocomplete="off" value="{$row.bank_name}"placeholder="请填写开户行" />
            </div>
        </div>
        <div class="form-group">
            <label for="bank_account" class="control-label col-xs-12 col-sm-2">{:__('Bank_account')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input type="text" class="form-control" id="bank_account" name="row[bank_account]" autocomplete="off" value="{$row.bank_account}"  placeholder="请填写开户账号" />
            </div>
        </div>
    </div>
    <div class="form-group hidden layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed ">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>